{template 'common/header'}
	<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="platform">
			<input type="hidden" name="a" value="stat">
			<input type="hidden" name="do" value="history">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">规则类型</label>
					<div class="col-sm-6 col-lg-8">
						<select name="searchtype" class="form-control">
							<option value="" selected="selected">不限</option>
							<option value="rule" {if 'rule' == $_GPC['searchtype']} selected="selected"{/if}>已有规则回复</option>
							<option value="default" {if 'default' == $_GPC['searchtype']} selected="selected"{/if}>默认规则回复</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">内容关键字</label>
					<div class="col-sm-6 col-lg-8">
						<input type="text" name="keyword" class="form-control" placeholder="请输入内容关键字">
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">日期范围</label>
					<div class="col-sm-6 col-xs-12 col-lg-8">
						{php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d', $starttime),'endtime'=>date('Y-m-d', $endtime)));}
					</div>
					<div class="pull-right col-xs-12 col-sm-3 col-lg-2">
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="panel panel-default">
		<div class="panel-heading">
			详细数据
		</div>
		<div class="table-responsive panel-body">
			<table class="table table-hover">
				<thead>
					<tr>
						<th style="width:80px;">用户<i></i></th>
						<th class="row-hover">内容<i></i></th>
						<th style="width:110px;">规则<i></i></th>
						<th style="width:80px;">模块<i></i></th>
						<th style="width:150px;">时间<i></i></th>
						<th style="width:110px;">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $row}
					<tr>
						<td><a href="#" title="{$row['from_user']}">{php echo cutstr($row['from_user'], 8)}</a></td>
						<td align="left" class="row-hover"><div style="max-width:515px; overflow:hidden; word-break:break-all; word-wrap:break-word;">{$row['message']}</div></td>
						<td>
							{if empty($row['rid'])}
								N/A
							{else}
								{if $row['module'] <> 'cover'}
									<a target="main" href="{php echo url('platform/reply/post', array('m' => $row['module'], 'rid' => $row['rid']))}">{php echo cutstr($rules[$row['rid']]['name'], 6)}</a>
								{else}
									<a target="main" href="{php echo url('platform/cover/site')}">{php echo cutstr($rules[$row['rid']]['name'], 6)}</a>
								{/if}
							{/if}
						</td>
						<td>{$row['module']}</td>
						<td style="font-size:12px; color:#666;">
						{php echo date('Y-m-d <br /> H:i:s', $row[createtime]);}
						</td>
						<td>
						<a href="{php echo url('platform/stat/del', array('op' => 'history', 'id' => $row['id']))}" onclick="return confirm('删除后不能恢复，您确定删除吗？')" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="删除"><i class="fa fa-times"></i></a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
	</div>
{$pager}
<script>
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});
</script>
{template 'common/footer'}
